This API method creates a new table order for a given table number.

https://api.e-food.nl/v2/table/order

Request

The request contains the store and city name as identifier, the table number to which the order should be linked and a collection of items to be ordered.

Field name Type Required Description
StoreName string Y The name of the store
CityName string Y The name of the city
Table int Y The table number to which the order should be linked
Items collection Y A collection of CartItem

Sample request

This sample request creates a new order for table eight, ordering one item 123 passing a note, and ordering two times item 124 combined with extra 130. Also one item 125 is ordered with the selected answer 51 for question 41 which is a Frikandel.

{
    "cityName": "foo",
    "storeName": "bar",
    "table": 8,
    "items": [
        {
            "id": 123,
            "quantity": 1,
            "note": "Well-done"
        },
        {
            "id": 124,
            "quantity": 2,
            "extras": [
                {
                    "id": 130
                }
            ]
        },
        {
            "id": 125,
            "quantity": 1,
            "questions": [
                {
                    "id": 41,
                    "answer": {
                        "id": 51,
                        "linkId": 80,
                        "text": "Frikandel"
                    }
                }
            ]
        }
    ]
}

Response

The response contains errors if the order request failed, or the order ID if it succeeded. The response below is for a successful order creation.

Field name Type Description
success bool Indicator whether the order is created succesful
orderId string The order ID
errors collection A collection of errors if any

Sample response

{
  "success": true,
  "orderId": 23,
  "errors": []
}